<!DOCTYPE html>
<html>
<meta charset="utf-8">
<head th:include="include :: header"></head>
<body class="gray-bg">
	<div class="wrapper wrapper-content ">
		<div class="row">
			<div class="col-sm-12">
				<div class="ibox float-e-margins">
					<div class="ibox-content">
						<form class="form-horizontal m-t" id="signupForm">
						<input id="id" name="id" th:value="${software.id}"  type="hidden">

							<div class="form-group">
								<label class="col-sm-3 control-label">出证日期：</label>
								<div class="col-sm-4">
									<div class="input-group date" id='date1'>
										<input id="approvalDate" name="approvalDate" th:value="${software.approvalDate}"  placeholder="2019-01-01" type="text" class="form-control">
										<span class="input-group-addon">
												<i class="glyphicon glyphicon-calendar"></i>
											</span>
									</div>
								</div>
							</div>
							<div class="form-group">
								<label class="col-sm-3 control-label">工作日：</label>
								<div class="col-sm-4">
									<select id="workDays" name="workDays" class="selectpicker" style="width:100%">
										<option th:selected="(${software.workDays}==0)" value="0">普件</option>
										<option th:selected="(${software.workDays}==31)" value="31">31工作日</option>
										<option th:selected="(${software.workDays}==26)" value="26">26-30工作日</option>
										<option th:selected="(${software.workDays}==21)" value="21">21-25工作日</option>
										<option th:selected="(${software.workDays}==16)" value="16">16-20工作日</option>
										<option th:selected="(${software.workDays}==11)" value="11">11-15工作日</option>
										<option th:selected="(${software.workDays}==6)" value="6">6-10工作日</option>
										<option th:selected="(${software.workDays}==5)" value="5">5工作日</option>
										<option th:selected="(${software.workDays}==4)" value="4">4工作日</option>
										<option th:selected="(${software.workDays}==3)" value="3">3工作日</option>
										<option th:selected="(${software.workDays}==2)" value="2">2工作日</option>
										<option th:selected="(${software.workDays}==1)" value="1">1工作日</option>
									</select>
								</div>
							</div>
							<div class="form-group">
								<label class="col-sm-3 control-label">原价（折前价）：</label>
								<div class="col-sm-4">
									<input id="price" name="price" th:value="${software.price}"  class="form-control" type="text">
								</div>
							</div>

							<div class="form-group">
								<label class="col-sm-3 control-label">特殊情况备注：</label>
								<div class="col-sm-8">
									<textarea id="comments" style="width:100%;" th:text="${software.comments}"   name="comments" rows="8"></textarea>
								</div>
								<input id="chstatus" name="chstatus" value="1"  type="hidden">
							</div>
							<div class="form-group">
								<div class="col-sm-8 col-sm-offset-3">
									<button type="submit" class="btn btn-primary">提交</button>
								</div>
							</div>
						</form>
					</div>
				</div>
			</div>
	</div>
	</div>
	<div th:include="include::footer"></div>
	<script type="text/javascript" src="/js/appjs/banquan/software/changewd.js">
	</script>
	<script>
		$(function () {
			$('#date1').datetimepicker({
				format: 'YYYY-MM-DD',
				locale: moment.locale('zh-cn')
			});
		});
	</script>
	<script>
		$("#workDays").on("change",function(){
			workDay = $("option:selected",this).val();//
			switch (workDay) {
				case '31':price=300;break;
				case '26':price=400;break;
				case '21':price=700;break;
				case '16':price=1000;break;
				case '11':price=1500;break;
				case '6':price=2000;break;
				case '5':price=3000;break;
				case '4':price=4000;break;
				case '3':price=5000;break;
				case '2':price=10000;break;
				case '1':price=20000;break;
				default:price=0;

			}
			document.getElementById("price").value=price;
			newComments=document.getElementById("comments").value +workDay;
			document.getElementById("comments").value=newComments;

		});

	</script>
</body>
</html>
